/*
  The <stdio.c> implements i/o functions in user space
 */

#include <stdlib.h>
#include <stdio.h>
#include <out_buffer.h>
#include <printf.h>

/*
FILE *fopen(const char *path, const char *mode);

and friends...

int fputc(int c, FILE *stream);
int fputs(const char *s, FILE *stream);
int fgetc(FILE *stream);
char *fgets(char *s, int size, FILE *stream);
int putc(int c, FILE *stream);
int getc(FILE *stream);
int ungetc(int c, FILE *stream);

NOT IMPLEMENTED FOR NOW

*/

int putchar(int c)
{
  char buf[4];

  buf[0]=(char)c;

  write(stdout,buf,1);

  return c;
}

int puts(const char *s)
{
  printf("%s",s);
}

int getchar(void)
{
  char buf[4];

  write(stdin,buf,1);

  return (int)(buf[0]);
}

char *gets(char *s)
{
  s='\0';

  return s;
}

